﻿@model NationalIT.Violations
@{
    ViewBag.Title = "Violations";
}
<div class="row-fluid">
    <div class="span12">
        <div class="box">
            <div class="box-title">
                <h3>
                    <i class="icon-table"></i>Violations</h3>
            </div>
            <div class="box-content">
                <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
                <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
                @using (Html.BeginForm(null, null, FormMethod.Post, new { @class = "form-horizontal" }))
                {
                    @Html.ValidationSummary(true)                    

                    @Html.HiddenFor(model => model.ID)
                    
                    <div class="control-group">
                        <label class="control-label" for="Driver">Driver</label>
                        <div class="controls">
                            <div class="span12">
                                <select data-placeholder="Select Driver" name="Driver" class="chosen-with-diselect input-xlarge">
                                    @Html.Raw(ViewBag.dataDriver_Info)
                                </select>
                                @Html.ValidationMessageFor(model => model.Driver)
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="Location">@Html.LabelFor(model => model.Location)</label>
                        <div class="controls">
                            <div class="span12">
                                @Html.TextBoxFor(model => model.Location, new { @class = "input-xlarge" })
                                @Html.ValidationMessageFor(model => model.Location)
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="Date_occurred">@Html.LabelFor(model => model.Date_occurred)</label>
                        <div class="controls">
                            <div class="span12">
                                @Html.TextBoxFor(model => model.Date_occurred, new { Value = Model != null && Model.Date_occurred.HasValue ? Model.Date_occurred.Value.ToString("MM/dd/yyyy") : "", @class = "input-xlarge date-picker" })
                                @*@Html.ValidationMessageFor(model => model.Date_occurred)*@
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="Date_resolved">@Html.LabelFor(model => model.Date_resolved)</label>
                        <div class="controls">
                            <div class="span12">
                                @Html.TextBoxFor(model => model.Date_resolved, new { Value = Model != null && Model.Date_resolved.HasValue ? Model.Date_resolved.Value.ToString("MM/dd/yyyy") : "", @class = "input-xlarge date-picker" })
                                @*@Html.ValidationMessageFor(model => model.Date_resolved)*@
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="Resolution">@Html.LabelFor(model => model.Resolution)</label>
                        <div class="controls">
                            <div class="span12">
                                @Html.TextBoxFor(model => model.Resolution, new { @class = "input-xlarge" })
                                @*@Html.ValidationMessageFor(model => model.Date_resolved)*@
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="Equipment">@Html.LabelFor(model => model.Equipment)</label>
                        <div class="controls">
                            <div class="span12">
                                <select data-placeholder="Select Equipment" name="Equipment" class="chosen-with-diselect input-xlarge">
                                    @Html.Raw(ViewBag.dataEquipment)
                                </select>
                                @Html.ValidationMessageFor(model => model.Equipment)
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="DispatcherID">Employee</label>
                        <div class="controls">
                            <div class="span12">
                                <select data-placeholder="Select Equipment" name="DispatcherID" class="chosen-with-diselect input-xlarge">
                                    @Html.Raw(ViewBag.dataDispatcher)
                                </select>
                                @Html.ValidationMessageFor(model => model.DispatcherID)
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="Details">@Html.LabelFor(model => model.Details)</label>
                        <div class="controls">
                            <div class="span12">
                                @Html.TextAreaFor(model => model.Details)
                                @*@Html.ValidationMessageFor(model => model.Date_resolved)*@
                            </div>
                        </div>
                    </div>
                    <div class="form-actions">
                        @Html.Partial("_ShowSaveEdit")
                    </div>
                }
            </div>
        </div>
    </div>
</div>
